home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / ScriptServer 1.0a4 / SSDecompile < prev   
Encoding:
Text File  |  1994-08-20  |  819 b   |  39 lines  |  [TEXT/MPS ]

  1. #    SSDecompile
  2. #
  3. #    This uses the SendAE tool and the ScriptServer application to 
  4. #    decompile AppleScript files into text files.
  5. #
  6. #    Written by Ult Mundane & Jon Pugh
  7. #
  8. #    Option -s: Launch ScriptServer before trying to send Apple events to it
  9. #
  10. #    {1} is the script to decompile
  11. #    {2} is the output text file
  12.  
  13. Loop
  14.     If "{1}" == ""
  15.         Break
  16.     Else If "{1}" == "-s"
  17.         Set lLaunchScriptServer TRUE
  18.     Else If "{lSource}" == ""
  19.         Set lSource "{1}"
  20.         Set lOrigSource "{lSource}"
  21.     Else If "{lTarget}" == ""
  22.         Set lTarget "{1}"
  23.     Else
  24.          Echo "### SSCompile - Too many parameters"
  25.         Exit
  26.     End
  27.     Shift
  28. End
  29.  
  30. If {lLaunchScriptServer} == TRUE
  31.     ScriptServer
  32. End
  33.  
  34. sendAE -e JonSDcmp -t ScriptServer -timeout 18000 -----alis {1} -"to  alis" {2}
  35. If !"`Exists -q "{lTarget}"`"
  36.     Echo "### SSDecompile - Error compiling ∂"{lOrigSource}∂"."
  37. End
  38.  
  39.